<?php

/*
 * This file is part of wanecho/Flarum-Adnet.
 *
 * Copyright (c) 2022 echo.
 *
 * For the full copyright and license information, please view the LICENSE.md
 * file that was distributed with this source code.
 */

namespace Wanecho\FlarumAdnet;

use Flarum\Extend;
use Flarum\Api\Serializer\PostSerializer;
use Wanecho\FlarumAdnet\Controllers\AdnetRewardController;
use Wanecho\FlarumAdnet\Controllers\AdsCallbackController;
use Wanecho\FlarumAdnet\Controllers\Api\LooknumsController;


return [
    (new Extend\Frontend('forum'))
        ->js(__DIR__ . '/js/dist/forum.js')
        ->css(__DIR__ . '/less/forum.less')
        ->route('/adnetreward', 'adnetreward.index', AdnetRewardController::class),
    (new Extend\Frontend('admin'))
        ->js(__DIR__ . '/js/dist/admin.js')
        ->css(__DIR__ . '/less/admin.less'),
    new Extend\Locales(__DIR__ . '/locale'),
    (new Extend\Routes('forum'))->get('/adsCallback', 'adnet.AdsCallbackget', AdsCallbackController::class),
    (new Extend\Routes('api'))->get('/looknums', 'adnet.getlooknums', LooknumsController::class),
    (new Extend\Settings)
        ->serializeToForum('flarum.adnet.adp_id', 'flarum.adnet.adp_id')
        ->serializeToForum('flarum.adnet.looklimit', 'flarum.adnet.looklimit'),

];
